package com.zhenyi.boya.index;

import java.io.File;

import com.cenjiawen.common.IndexController;
import com.jfinal.aop.Before;
import com.zhenyi.boya.interceptor.AuthInterceptor;

@Before(AuthInterceptor.class)
public class ApiController extends IndexController {
	
	public void uploadFile() {
		File file = getFileParam("file");
		String url = "/";

		StringBuilder sb = new StringBuilder();
		sb.append("/boya/files?name=").append(file.getName());
		url = sb.toString();

		renderResult(url);
	}

}
